package com.yugao.fintech.antelope.infra.module.dict;

import com.yugao.fintech.antelope.base.model.module.dict.CusFieldBind;
import com.yugao.fintech.framework.desensitization.fieldbind.inter.IFieldBindAnnotationDataGetter;
import com.yugao.fintech.framework.desensitization.fieldbind.model.FieldBindAnnotationData;
import org.springframework.stereotype.Component;


@Component
public class CusFieldBIndAnnotationDataGetter implements IFieldBindAnnotationDataGetter<CusFieldBind> {

    @Override
    public FieldBindAnnotationData initFieldBindAnnotation(CusFieldBind fieldAnnotation) {
        return FieldBindAnnotationData.builder().type(fieldAnnotation.type())
                .delimiter(fieldAnnotation.delimiter())
                .targetDelimiter(fieldAnnotation.targetDelimiter())
                .target(fieldAnnotation.target()).build();
    }
}
